<?php
$id=$_GET['id'];
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$sql="select * from novel where id='$id'";
$arr=$dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
?>
<form action="updatedo.php" method="post">
<table border="1">
    <tr>
        <td>小说网址</td>
        <td><input type="text" name="novel_url" value="<?php echo $arr['novel_url']?>"></td>
    </tr>
    <tr>
        <td>小说标题</td>
        <td><input type="text" name="novel_title" value="<?php echo $arr['novel_title']?>"></td>
    </tr>
    <tr>
        <td>小说内容</td>
        <td><input type="text" name="novel_content" value="<?php echo $arr['novel_content']?>"></td>
    </tr>
    <tr>
        <td>小说类型</td>
        <td><input type="text" name="novel_type" value="<?php echo $arr['novel_type']?>"></td>
    </tr>
    <tr>
        <td>小说作者</td>
        <td><input type="text" name="novel_author" value="<?php echo $arr['novel_author']?>"></td>
    </tr>
    <tr>
        <td><input type="submit" value="修改"></td>
    </tr>
    <input type="hidden" name="id" value="<?php echo $id?>">
</table>
</form>
